<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>有 54 张牌，请模拟⽃地主发牌给三个⼈，底牌留三张</title>
</head>
<body>
    <script>
        var Di = [
            '红桃A','红桃2','红桃3','红桃4','红桃5','红桃6','红桃7','红桃8','红桃9','红桃10','红桃J','红桃K','红桃K',
            '方片A','方片2','方片3','方片4','方片5','方片6','方片7','方片8','方片9','方片10','方片J','方片Q','方片K',
            '黑桃A','黑桃2','黑桃3','黑桃4','黑桃5','黑桃6','黑桃7','黑桃8','黑桃9','黑桃10','黑桃J','黑桃Q','黑桃K',
            '梅花A','梅花2','梅花3','梅花4','梅花5','梅花6','梅花7','梅花8','梅花9','梅花10','梅花J','梅花Q','梅花K',
            '大王','小王'
        ];
        for(let i = Di.length - 1;i > 0;i--){
            const sak = Math.floor(Math.random() * (i + 1));
            [Di[i],Di[sak]] = [Di[sak],Di[i]];
        }
        var Nomin1 = Di.slice(0,17);// 农民1/地主的牌
        var Nomin2 = Di.slice(17,34);
        var Nomin3 = Di.slice(34,51);
        var san = Di.slice(51,54);
        console.log('农民1/地主的牌： ' + Nomin1);
        console.log('农民2/地主的牌： ' + Nomin2);
        console.log('农民3/地主的牌： ' + Nomin3);
        console.log('三张底牌： ' + san);
    </script>
</body>
</html>